package net.zjitc.controller;
import net.zjitc.bao.book;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
public class BookController {
    @Autowired
    book book;

    @GetMapping("/book")
    public String book() {
        return book.toString();
    }
    @GetMapping("/")
    public String index() {
        return "欢迎访问首页，可访问 /book 查看书籍信息";
    }
}